def factorial(n):
    '''
    求n的阶乘
    :param n:   给定的某个自然数
    :return:    n的阶乘
    '''
    if n == 1 or n == 0:
        return 1
    else:
        return n * factorial(n - 1)


r = 5
print('{}的阶乘是：{}'.format(r, factorial(5)))
